package com.chinasofti.generic;

import com.chinasofti.optional.Student;

import java.util.ArrayList;
import java.util.List;

public class Demo01 {
    public static void main(String[] args) {
        //List<Student> list = new ArrayList<>();
        List list = new ArrayList();
        list.add("123");
        list.add(123);
        list.add(new Student());
        Student s = (Student)list.get(0);//ClassCastException
        s.getAge();
    }
}
